import React from 'react';
import {Button} from "antd";
import {requestGet} from "util/request";
import LogFactory from "log/LogFactory";

const log = LogFactory.getLog("PageSettingComponent") ;
const PageSettingComponent = () => {

    const onClick = () => {
        log.debug("coo",document.cookie) ;
        const date = new Date();
        date.setTime(date.getTime() + (2 * 24 * 60 * 60 * 1000));
        let expires = "";
        expires = "; expires=" + date.toUTCString();
        document.cookie = expires ;
        document.cookie = "username=" + "username" + "; path=/";

        log.debug("coosssv",document.cookie) ;
        requestGet("/record/test")
            .then(res => {
                log.debug("res",res) ;
            });
    } ;

    return (
        <div>
        <Button onClick={onClick}> 测试按钮 </Button>
        </div>
    );
};

export default PageSettingComponent;